home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BorderStyle = 3 'Fixed Double
- Caption = "Picture Scroll Demonstration"
- ClientHeight = 3720
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 4425
- Height = 4125
- Left = 1035
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 3720
- ScaleWidth = 4425
- Top = 1140
- Width = 4545
- Begin PictureBox Picture1
- Height = 3255
- Left = 120
- ScaleHeight = 3225
- ScaleWidth = 3945
- TabIndex = 0
- Top = 120
- Width = 3975
- Begin PictureBox Picture2
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 7200
- Left = -1800
- Picture = PICSCROL.FRX:0000
- ScaleHeight = 7200
- ScaleWidth = 9600
- TabIndex = 1
- Top = -960
- Width = 9600
- End
- End
- Begin VScrollBar VScroll1
- Height = 3255
- Left = 4080
- SmallChange = 10
- TabIndex = 3
- Top = 120
- Width = 255
- End
- Begin HScrollBar HScroll1
- Height = 255
- Left = 120
- SmallChange = 10
- TabIndex = 2
- Top = 3360
- Width = 3975
- End
- Sub Form_Load ()
- picture2_change
- End Sub
- Sub HScroll1_Change ()
- picture2.left = picture1.left - hscroll1.value
- End Sub
- Sub picture2_change ()
- vscroll1.min = picture1.top
- hscroll1.min = picture1.left
- vscroll1.max = picture2.height - picture1.height
- If vscroll1.max < vscroll1.min Then
- vscroll1.max = vscroll1.min
- End If
- hscroll1.max = picture2.width - picture1.width
- If hscroll1.max < hscroll1.min Then
- hscroll1.max = hscroll1.min
- End If
- vscroll1.LargeChange = picture2.height / 10
- hscroll1.LargeChange = picture2.width / 10
- End Sub
- Sub VScroll1_Change ()
- picture2.top = picture1.top - vscroll1.value
- End Sub
-